package com.yingyi.system.domain;
import com.yingyi.basic.domain.BaseDomain;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;


import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * (Menu)实体类
 * 对应的表（t_menu）
 * @author Yingyi
 * @since 2022-08-02 10:57:48
 */
@Data 
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "(Menu)")
public class Menu extends BaseDomain{
    
    
    @ApiModelProperty(value = "")
    private String name;
    
    @ApiModelProperty(value = "")
    private String component;
    
    @ApiModelProperty(value = "")
    private String url;
    
    @ApiModelProperty(value = "")
    private String icon;
    
    @ApiModelProperty(value = "")
    private Integer index;
    
    @ApiModelProperty(value = "")
    private Long parentId;

    //对应parentId的 父级菜单
    private Menu parent;
    
    @ApiModelProperty(value = "")
    private String intro;
    
    @ApiModelProperty(value = "")
    private Boolean state = true;


    //当前菜单的子菜单
    @ApiModelProperty(value = "")
    //菜单树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<>();
}
